﻿<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<WebSite.Models.BudgetDetailModel>" %>
<%@ Import Namespace="WebSite.Models" %>
<%@ Import Namespace="WebSite.App_Code" %>
<%@ Import Namespace="WebSite.App_Data" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>详细信息</title>

    <style type="text/css">
    
    * { font-size:9pt; }
        
    .DataLeft
    {
        border-top:1px solid black; 
        border-left:2px solid black; 
        border-right:1px solid black;
    }
    
    .DataCenter
    {
        border-top:1px solid black; 
        border-right:1px solid black
    }
    
    .DataRight
    { 
        border-top:1px solid black; 
        border-right:2px solid black
    }
    
    .DataH
    {
         background-color:#CCFFCC;
         text-align:center;
         white-space:nowrap;
         height:30px;
         padding:0px 5px 0px 5px;
    }
    
    .DataC
    {
         text-align:left;
         padding:0px 0px 0px 5px;
         height:30px;
    }
    
    .DataE
    {
         text-align:left;
         padding:0px 0px 0px 5px;
    }
    
    .DataE_R
    {
         text-align:right;
    }
    
    .EditTxt
    {
        border:none;
        width:90%;
        padding-top:2px;
        background-color:#CCCCCC;
    }
    
    .EditTxtM
    {
        border:none;
        width:97%;
        background-color:#CCCCCC;
        
    }
    
    </style>
</head>

<body>
<center>
    <br />
    <br />

    <% decimal decItemTotalAmount = Model.Budget_Item.Where(o => o.ItemLevel == 1).Sum(o => o.ItemAmount); %>

	<% if (Model.Project_Category.ID == "1" || Model.Project_Category.ID == "2") { %>

	<table border="0" cellpadding="0" cellspacing="0" style="width:800px;">
        <tr>
            	<td>&nbsp;</td>
            	<td align="right">
			<b style="font-size:x-large"><%=Model.Budget.Year %></b>&nbsp;
		</td>
            	<td colspan="6" align="left">
			<b style="font-size:x-large">
			<% if (Model.Project_Category.ID == "1") { %>
				年度预算科研项目经费预算明细表 <% } %>
			<% if (Model.Project_Category.ID == "2") { %>
				年度预算外科研项目经费预算明细表 <% } %>
			</b>
		</td>
        </tr>
        <tr>
            	<td colspan="7" style="text-align:left">编制单位：&nbsp
			<%=Model.Project_Department.DepartmentName %>&nbsp;
		</td>
            	<td style=" text-align:right; white-space:nowrap">金额单位：元&nbsp;</td>
        </tr>
        <tr>
            	<td class="DataH DataLeft" style="border-top:2px solid black; ">项目名称</td>
			<%--项目名称--%>
     		<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
            	<td colspan="7" class="DataE DataRight" style="border-top:2px solid black;">
                	<%=Html.TextBoxFor(o => o.Project.ProjectName, new { @class="EditTxt" })%> <% } %>
            	<% else { %>
            	<td colspan="7" class="DataC DataRight" style="border-top:2px solid black;">
                	<%=Model.Project.ProjectName %>&nbsp;<% } %>
            	</td>
        </tr>
        <tr>
            	<td class="DataH DataLeft">项目代码</td>
            	<td class="DataC DataCenter"><%=Model.Project.ProjectCode %>&nbsp;</td>
            	<td class="DataH DataCenter">年度进度</td>
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td class="DataE DataCenter">
                  	<%=Html.DropDownListFor(o => o.Budget.AnnualProgress, Model.DS_AP)%> <% } %>
            	<% else { %> 
                <td class="DataC DataCenter"。>
                	<%=Model.Budget.AnnualProgress %>&nbsp;<% } %>
            	</td>
            	<td colspan="2" class="DataH DataCenter">经费来源</td>
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td colspan="2" class="DataE DataRight">
              		<%=Html.TextBoxFor(o => o.Project.FundsSources, new { @class = "EditTxt" })%> <% } %> 
            	<% else { %> 
                <td colspan="2" class="DataC DataRight">
                	<%=Model.Project.FundsSources%>&nbsp;<% } %>
            	</td>
        </tr>
        <tr>
            	<td class="DataH DataLeft">项目周期-起</td>
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td class="DataE DataCenter">            
                	<%=Html.TextBoxFor(o => o.Project.ProjectBeginTime, new { @class = "EditTxt" })%> <% } %>
            	<% else { %>
                <td class="DataC DataCenter">
                	<%=Model.Project.ProjectBeginTime%>&nbsp;<% } %>
            	</td>
            	<td class="DataH DataCenter">项目周期-止</td>
            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td class="DataE DataCenter">    
                	<%=Html.TextBoxFor(o => o.Project.ProjectEndTime, new { @class = "EditTxt" })%> <% } %>
            	<% else { %>
                <td class="DataC DataCenter">
                	<%=Model.Project.ProjectEndTime%>&nbsp;<% } %>
            	</td>
            	<td class="DataH DataCenter">项目负责人</td>
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td class="DataE DataCenter">
                	<%=Html.DropDownListFor(o => o.Project.ProjectPIC, Model.DS_PIC_P)%> <% } %>
            	<% else { %>
                <td class="DataC DataCenter">
                	<%=Model.Project_PIC.UserName%>&nbsp;<% } %>
            	</td>
            	<td class="DataH DataCenter">是否为软课题</td>
            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td class="DataE DataRight">
                	<%=Html.DropDownListFor(o => o.Budget.IsSoft, Model.DS_IsS)%> <% } %>
            	<% else { %>
                <td class="DataC DataRight">
                	<%=Model.Budget_IsSoft.Name%>&nbsp;<% } %>
            	</td>
        </tr>

		<%--垫支--%>
        <tr>
            	<td class="DataH DataLeft">是否垫支</td>
            	<td class="DataH DataCenter">拟到经费总额</td>
            	<td class="DataH DataCenter">预计经费到位时间</td>
            	<td class="DataH DataCenter">预计归垫时间</td>
            	<td class="DataH DataCenter">归垫责任人</td>
            	<td class="DataH DataCenter">垫支金额</td>
            	<td colspan="2" class="DataH DataRight">备注</td>
        </tr>
        <tr>
           	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td class="DataLeft">
                	<%=Html.DropDownListFor(o => o.C.IsA.Value, Model.DS_IsA)%> <% } %>
            	<% else { %>
                <td class="DataLeft">
                	<%=Model.C.IsA.Name %>&nbsp;<% } %>
            	</td>
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %>
                <td  class="DataE DataCenter">
                	<%=Html.TextBoxFor(o => o.Budget.AdvencePlanAmount, new { @class = "EditTxt" })%> <% } %>
            	<% else { %>
                <td  class="DataC DataCenter">
                	<%=Model.Budget.AdvencePlanAmount.ToString("f2") %>&&nbsp;<% } %>
            	</td>
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <td  class="DataE DataCenter">
                	<%=Html.TextBoxFor(o => o.Budget.AdvencePlanTime, new { @class = "EditTxt" })%> <% } %>
            	<% else { %>
            	<td  class="DataC DateCenter">
            		<%=Model.Budget.AdvencePlanTime %>&nbsp;<% } %>
            	</td>
            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
            	<td  class="DataE DataCenter">
                	<%=Html.TextBoxFor(o => o.Budget.AdvenceReturnTime, new { @class = "EditTxt" })%> <% } %>
            	<% else { %>
                <td  class="DataC DataCenter">
                	<%=Model.Budget.AdvenceReturnTime%>&nbsp;<% } %>
            	</td>
            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataCenter">	
			<%=Html.DropDownListFor(o => o.Budget.AdvencePIC, Model.DS_PIC_A) %> <% } %>
            	<% else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget_AdvencePIC.UserName%>&nbsp;<% } %>
            	</td>
            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget.AdvenceAmount, new { @class="EditTxt" })%> <% } %>
		<% else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget.AdvenceAmount.ToString("f2")%>&nbsp;<% } %>
            	</td>
            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td colspan="2" class="DataE_R DataRight">
			<%=Html.TextAreaFor(o => o.Budget.AdvencetRemark, new { @class = "EditTxtM" })%> <% } %>
		<% else { %>
		<td colspan="2" class="DataC DataRight">
			<%=Model.Budget.AdvencetRemark%>&nbsp;<% } %>
            	</td>
       	</tr>
        <tr>
            	<td class="DataH DataLeft">状态</td>
		<td class="DataC DataCenter"><%=Model.C.AS.Name %>&nbsp;</td>
            	<td class="DataH DataCenter">垫支转入</td>
		<td class="DataC DataCenter"><%=Model.Budget.AdvenceBalance.ToString("f2")%>&nbsp;</td>
            	<td class="DataH DataCenter">尚未归垫</td>
		<td class="DataC DataCenter"><%=Model.C.z.ToString("f2")%></td>
            	<td class="DataH DataCenter">归垫后余额</td>
		<td class="DataC DataRight"><%=Model.C.f.ToString("f2")%></td>
        </tr>

		<%--预算--%>
        <tr>
            	<td class="DataH DataLeft">预算金额</td>
            	<td class="DataH DataCenter" >标准领报</td>
            	<td class="DataH DataCenter" >项目经费</td>
            	<td class="DataH DataCenter" >家底弥补</td>
            	<td class="DataH DataCenter" >其他收入</td>
            	<td class="DataH DataCenter" >上年转入</td>
            	<td colspan="2" class="DataH DataRight">备注</td>
        </tr>
        <tr>
            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataLeft">
			<%=Html.TextBoxFor(o => o.C.S, new { @class = "EditTxt" })%> <% } %>
		<% else { %>
		<td class="DataC DataLeft">
			<%=Model.C.S.ToString("f2")%>&nbsp;<% } %>
            	</td>
		<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget.Income_StandardFunds, new { @class = "EditTxt" })%> <% } %>
		<% else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget.Income_StandardFunds.ToString("f2")%>&nbsp;<% } %>
            	</td>
		<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget.Income_ProjectFunds, new { @class = "EditTxt" })%> <% } %>
		<% else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget.Income_ProjectFunds.ToString("f2")%>&nbsp;<% } %>
            	</td>
		<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget.Income_Subvention, new { @class = "EditTxt" })%> <% } %>
		<% else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget.Income_Subvention.ToString("f2")%>&nbsp;<% } %>
            	</td>
		<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget.Income_Other, new { @class = "EditTxt" })%> <% } %>
		<% else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget.Income_Other.ToString("f2")%>&nbsp;<% } %>
            	</td>
		<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget.Income_Balance, new { @class = "EditTxt" })%> <% } %>
		<% else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget.Income_Balance.ToString("f2")%>&nbsp;<% } %>
            	</td>
		<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td colspan="2" class="DataE_R DataRight">
			<%=Html.TextAreaFor(o => o.Budget.BudgetRemark, new { @class = "EditTxtM" })%> <% } %>
		<% else { %>
		<td colspan="2" class="DataC DataRight">
			<%=Model.Budget.BudgetRemark %>&nbsp;<% } %>
            	</td>
       	</tr>

		<%--当年支出金额--%>
		<% if (Model.Project.ProjectCategoryID == "1") { %>
        <tr>
       	 	<td class="DataH DataLeft">当年支出金额</td>
            	<td class="DataH DataCenter">设备费</td>
            	<td class="DataH DataCenter">材料费</td>
            	<td class="DataH DataCenter">协作费</td>
            	<td class="DataH DataCenter">业务费</td>
            	<td class="DataH DataCenter">待预算经费</td>
            	<td colspan="2" class="DataH DataRight">备注</td>
        </tr>
		<tr>
       		<td class="DataC DataLeft">
                	<%=Model.Budget.BudgetPay_Amount.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Equipment.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Material.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Coordination.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Bussiness.ToString("f2")%>&nbsp;
            	</td>
            	<td class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Budget.ToString("f2")%>&nbsp;
            	</td>
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
				<td colspan="2" class="DataE_R DataRight" style="text-align:right;">
				<%=Html.TextAreaFor(o => o.Budget.BudgetPay_Remark, new { @class = "EditTxtM" })%> <% } %>
            <% else { %>
				<td colspan="2" class="DataC DataRight">
				<%=Model.Budget.BudgetPay_Remark %>&nbsp;<% } %>
            </td>
        </tr>
		<%} %>
		<% if (Model.Project.ProjectCategoryID == "2") { %>
        <tr>
       	 	<td class="DataH DataLeft">当年支出金额</td>
            	<td class="DataH DataCenter">设备费</td>
            	<td class="DataH DataCenter">材料费</td>
            	<td class="DataH DataCenter">协作费</td>
            	<td class="DataH DataCenter">业务费</td>
            	<td class="DataH DataCenter">分摊费用</td>
				<td class="DataH DataCenter">待预算经费</td>
            	<td class="DataH DataRight">上缴利润</td>
        </tr>
		<tr>
       		<td class="DataC DataLeft">
                	<%=Model.Budget.BudgetPay_Amount.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Equipment.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Material.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Coordination.ToString("f2")%>&nbsp;
            	</td>
            	<td  class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Bussiness.ToString("f2")%>&nbsp;
            	</td>
            	<td class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Charge.ToString("f2")%>&nbsp;
            	</td>
				<td class="DataC DataCenter">
                	<%=Model.Budget.BudgetPay_Amount_Budget.ToString("f2")%>&nbsp;
            	</td>
				<td class="DataC DataRight">
                	<%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;
            	</td>
        </tr>
		<%} %>

		<%--历年支出金额 & 当年支出实际--%>
		<% if (Model.Project.ProjectCategoryID == "1") { %>
        <tr>
            <td class="DataH DataLeft">历史支出金额</td>
			<%--历史支出金额--%>
            <%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
			<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget.His_Amount, new { @class = "EditTxt" })%> <% } %>
            <% else { %>
			<td class="DataC DataCenter">
			<%=Model.Budget.His_Amount.ToString("f2") %>&nbsp;<% } %>
            </td>
            <td class="DataH DataCenter" >备注</td>
			<%--备注--%>
      	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE_R DataCenter">
		<%=Html.TextAreaFor(o => o.Budget.His_Remark, new { @class = "EditTxtM" })%> <% } %>
       	<% else { %>
		<td class="DataC DataCenter">
		<%=Model.Budget.His_Remark %>&nbsp;<% } %>
            </td>
            <td class="DataH DataCenter" >当年支出实际</td>
            <td  class="DataC DataCenter"> 
                <%=Model.Budget.ActualPay_Amount.ToString("f2")%>&nbsp;
            </td>
            <td class="DataH DataCenter" >备注</td>
                <%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
		<td class="DataE_R DataRight">
		<%=Html.TextAreaFor(o => o.Budget.ActualPay_Remark, new { @class = "EditTxtM" })%> <% } %>
                <% else { %>
		<td class="DataC DataRight">
		<%=Model.Budget.ActualPay_Remark%>&nbsp;<% } %>
            </td>
        </tr>
		<tr>
            <td class="DataH DataLeft">设备费</td>
            <td class="DataH DataCenter">材料费</td>
            <td class="DataH DataCenter">协作费</td>
            <td class="DataH DataCenter">业务费</td>
            <td class="DataH DataCenter">设备费</td>
            <td class="DataH DataCenter">材料费</td>
            <td class="DataH DataCenter">协作费</td>
            <td class="DataH DataRight">业务费</td>
        </tr>
		<tr>
            <td class="DataC DataLeft">
                <%=Model.Budget.His_Amount_Equipment.ToString("f2")%>&nbsp;
            </td>
            <td  class="DataC DataCenter">
                <%=Model.Budget.His_Amount_Material.ToString("f2")%>&nbsp;
            </td>
            <td  class="DataC DataCenter">
                <%=Model.Budget.His_Amount_Coordination.ToString("f2")%>&nbsp;
            </td>
            <td  class="DataC DataCenter">
                <%=Model.Budget.His_Amount_Bussiness.ToString("f2")%>&nbsp;
            </td>
            <td  class="DataC DataCenter">
                <%=Model.Budget.ActualPay_Amount_Equipment.ToString("f2")%>&nbsp;
            </td>
            <td  class="DataC DataCenter">
                <%=Model.Budget.ActualPay_Amount_Material.ToString("f2")%>&nbsp;
            </td>
            <td  class="DataC DataCenter">
                <%=Model.Budget.ActualPay_Amount_Coordination.ToString("f2")%>&nbsp;
            </td>
            <td class="DataC DataRight">
                <%=Model.Budget.ActualPay_Amount_Bussiness.ToString("f2")%>&nbsp;
            </td>
        </tr>
		<%} %>
		<% if (Model.Project.ProjectCategoryID == "2") { %>
		<tr>
            <td class="DataH DataLeft">历年支出金额</td>
            <td class="DataH DataCenter">设备费</td>
            <td class="DataH DataCenter">材料费</td>
            <td class="DataH DataCenter">协作费</td>
            <td class="DataH DataCenter">业务费</td>
            <td class="DataH DataCenter">分摊费用</td>
            <td colspan="2" class="DataH DataRight">备注</td>
        </tr>
		<tr>
			<%--历年支出金额--%>
			<td class="DataC DataLeft"><%=Model.Budget.His_Amount.ToString("f2") %>&nbsp;</td>
			<%--设备费--%>
			<td class="DataC DataCenter"><%=Model.Budget.His_Amount_Equipment.ToString("f2")%>&nbsp;</td>
			<%--材料费--%>
			<td class="DataC DataCenter"><%=Model.Budget.His_Amount_Material.ToString("f2")%>&nbsp;</td>
			<%--协作费--%>
			<td class="DataC DataCenter"><%=Model.Budget.His_Amount_Coordination.ToString("f2")%>&nbsp;</td>
			<%--业务费--%>
			<td class="DataC DataCenter"><%=Model.Budget.His_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
			<%--分摊费用--%>
			<td class="DataC DataCenter"><%=Model.Budget.His_Amount_Charge.ToString("f2")%>&nbsp;</td>
			<%--备注--%>
            <td colspan="2" class="DataC DataRight"><%=Model.Budget.His_Remark%>&nbsp;</td>
        </tr>
		<tr>
            <td class="DataH DataLeft">当年支出金额</td>
            <td class="DataH DataCenter">设备费</td>
            <td class="DataH DataCenter">材料费</td>
            <td class="DataH DataCenter">协作费</td>
            <td class="DataH DataCenter">业务费</td>
            <td class="DataH DataCenter">分摊费用</td>
            <td colspan="2" class="DataH DataRight">备注</td>
        </tr>
		<tr>
			<%--当年支出金额--%>
			<td class="DataC DataLeft"><%=Model.Budget.ActualPay_Amount.ToString("f2")%>&nbsp;</td>
			<%--设备费--%>
			<td class="DataC DataCenter"><%=Model.Budget.ActualPay_Amount_Equipment.ToString("f2")%>&nbsp;</td>
			<%--材料费--%>
			<td class="DataC DataCenter"><%=Model.Budget.ActualPay_Amount_Material.ToString("f2")%>&nbsp;</td>
			<%--协作费--%>
			<td class="DataC DataCenter"><%=Model.Budget.ActualPay_Amount_Coordination.ToString("f2")%>&nbsp;</td>
			<%--业务费--%>
			<td class="DataC DataCenter"><%=Model.Budget.ActualPay_Amount_Bussiness.ToString("f2")%>&nbsp;</td>
			<%--分摊费用--%>
			<td class="DataC DataCenter"><%=Model.Budget.ActualPay_Amount_Charge.ToString("f2")%>&nbsp;</td>
			<%--备注--%>
            <td colspan="2" class="DataC DataRight"><%=Model.Budget.ActualPay_Remark%>&nbsp;</td>
        </tr>
		<%} %>

		<%--当年预算支出明细--%>
        <tr>
            <td colspan="8" class="DataH DataLeft DataRight">
                <b>当年预算支出明显</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH DataLeft">序号</td>
            <td colspan="2" class="DataH DataCenter" >支出品名</td>
            <td class="DataH DataCenter" >数量</td>
            <td class="DataH DataCenter" >单价</td>
            <td colspan="2" class="DataH DataCenter" >金额</td>
            <td class="DataH DataRight">备注</td>
        </tr>
        <%  for(int i =0; i < Model.Budget_Item.Count; i++) {
                wf_BudgetItem oItem = Model.Budget_Item[i];%>
            <% if (oItem.ItemLevel == 1) { %>
            <tr>
                <td class="DataH DataLeft"><b><%=oItem.ItemSN%></b>&nbsp;</td>
                <td class="DataH DataCenter" colspan="2" ><b><%=oItem.ItemName%></b>&nbsp;</td>
                <td class="DataH DataCenter" ><b></b>&nbsp;</td>
                <td class="DataH DataCenter" ><b></b>&nbsp;</td>
                <td class="DataH DataCenter" colspan="2" ><b><%=oItem.ItemAmount.ToString("f2")%></b>&nbsp;</td>
                <td class="DataH DataRight"><b><%=oItem.ItemRem%></b>&nbsp;</td>
            </tr>
            <% } else  {
          Boolean HasC = Model.Budget_Item.Where(o => o.ParentGuid == Model.Budget_Item[i].Guid).Any(); %>
            <tr>
          	<td class="DataC DataLeft">
			<%=Model.Budget_Item[i].ItemSN %>
		</td>
		
            	<%if (Model.PageType == L_BudgetDetailPageType.ForAppove && Model.Budget_Item[i].ItemLevel == 3) { %>
		<td colspan="2"  class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget_Item[i].ItemName, new { @class = "EditTxt" })%> 
          	<% }  else  { %>
		<td colspan="2" class="DataC DataCenter">
			<%=Model.Budget_Item[i].ItemName%>&nbsp;<% } %>
                </td>

              	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <% if (!HasC) { %>
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget_Item[i].ItemCount, new { @class = "EditTxt" })%>
              	<% } else { %>
		<td class="DataC DataCenter">
			&nbsp;<% } %>
             	<% } else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget_Item[i].ItemCount%>&nbsp;<% } %>
                </td>

            	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
                <% if (!HasC) { %>
		<td class="DataE DataCenter">
			<%=Html.TextBoxFor(o => o.Budget_Item[i].ItemPrice, new { @class = "EditTxt" })%>
              	<% } else { %>
		<td class="DataC DataCenter">&nbsp;<% } %>
             	<% } else { %>
		<td class="DataC DataCenter">
			<%=Model.Budget_Item[i].ItemPrice.Value.ToString("f2") %>&nbsp;<% } %>
                </td>
		
                <td colspan="2" class="DataC DataCenter">
			<%=Model.Budget_Item[i].ItemAmount.ToString("f2")%>&nbsp;
                </td>
		             
             	<% if (Model.PageType == L_BudgetDetailPageType.ForAppove 
			&& Model.Budget_Item[i].ItemLevel > 1) { %> 
		<td class="DataE DataRight">
			<%=Html.TextBoxFor(o => o.Budget_Item[i].ItemRem, new { @class = "EditTxt" })%> 
           	<% } else { %>
		<td class="DataC DataRight">
			<%=Model.Budget_Item[i].ItemRem%>&nbsp;<% } %>
                </td>
            </tr>            
            <% } %>
        <% } %>
		<tr>
      		<td class="DataH DataLeft">&nbsp;</td>
            	<td class="DataH DataCenter" colspan="2" ><b>支出合计</b>&nbsp;</td>
            	<td class="DataH DataCenter" >&nbsp;</td>
            	<td class="DataH DataCenter" >&nbsp;</td>
            	<td class="DataH DataCenter" colspan="2" >
			<%=decItemTotalAmount.ToString("f2")%>&nbsp;</td>
            	<td class="DataH DataRight">&nbsp;</td>
        </tr>

		<%--待预算经费--%>
		<% if (Model.Project.ProjectCategoryID == "1") { %>    	
        <tr>
            	<td class="DataH DataLeft">&nbsp;</td>
            	<td class="DataH DataCenter" colspan="2" ><b>待预算经费</b>&nbsp;</td>
            	<td class="DataH DataCenter" >&nbsp;</td>
            	<td class="DataH DataCenter" >&nbsp;</td>
            	<td class="DataH DataCenter" colspan="2" >
			<%=(Model.Budget.BudgetAmount - decItemTotalAmount).ToString("f2")%>&nbsp;</td>
            	<td class="DataH DataRight">&nbsp;</td>
        </tr>
		<%} %>
		<% if (Model.Project.ProjectCategoryID == "2") { %>
		<tr>
			<td class="DataH DataLeft">&nbsp;</td>
			<td class="DataH DataCenter" colspan="2" ><b>待预算经费</b>&nbsp;</td>
			<td class="DataH DataCenter" >&nbsp;</td>
			<td class="DataH DataCenter" >&nbsp;</td>
			<%if (Model.PageType == L_BudgetDetailPageType.ForAppove) { %> 
			<td class="DataE DataCenter" colspan="2">
			<%=Model.Budget.His_Amount.ToString("f2") %>&nbsp;<% } %>
            <% else { %>
			<td class="DataC DataCenter" colspan="2">
			<%=Model.Budget.His_Amount.ToString("f2") %>&nbsp;<% } %>
            </td>
			<td class="DataH DataRight">&nbsp;</td>
        </tr>
		<%} %>

		<%--经费预算上缴利润情况--%>							
		<% if (Model.Project.ProjectCategoryID == "2") { %>
		<tr>
            <td class="DataH " colspan="8" style="border-top:1px solid black; border-right:2px solid black; border-left:2px solid black;"><b>经费预算上缴利润情况</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH DataLeft" colspan="3"><b>上缴利润</b>&nbsp;</td>
            <td class="DataH DataRight" colspan="5"><%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;</td>
        </tr>
		<%} %>

        <tr><td colspan="8" style="border-top:2px solid black;">&nbsp;</td></tr>
    </table>
        
    <% } %>

    <%if (Model.Project_Category.ID == "4")
      { %>
    
    <table border="0" cellpadding="10" cellspacing="0" style="width:800px">
        <tr>
            <td colspan="2">&nbsp;</td>
            <td align="right">
                <b style="font-size:x-large"><%=Model.Budget.Year%></b>&nbsp;</td>
            <td colspan="7" align="left">
                <b style="font-size:x-large">年度机关<%=Model.Project_Type.Name%>经费预算明细表</b>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2">编制单位：&nbsp;</td>
            <td colspan="7"><%=Model.Project_Department.DepartmentName%>&nbsp;</td>
            <td colspan="1" style=" text-align:right">金额单位：元&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:1px solid black">
                科目名称&nbsp;</td>
            <td colspan="4"  style="border-top:2px solid black; border-right:1px solid black">
                <%=Model.Project.ProjectName%>&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:2px solid black; border-right:1px solid black">
                科目负责人&nbsp;</td>
            <td colspan="2" style="border-top:2px solid black; border-right:2px solid black">
                <%=Model.Project_PIC.UserName%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                是否垫支&nbsp;</td>
            <td colspan="2" class="DataH" >
                拟到经费总额&nbsp;</td>
            <td colspan="2" class="DataH" >
                预计经费到位时间&nbsp;</td>
            <td colspan="2" class="DataH" >
                预计归垫时间&nbsp;</td>
            <td colspan="2" class="DataH" >
                归垫责任人&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                垫支金额&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.IsA.Name%>&nbsp;</td>
            <td colspan="2" >
                <%=Model.Budget.AdvencePlanAmount.ToString("f2")%>&nbsp;</td>
            <td colspan="2" >
                <%=Model.Budget.AdvencePlanTime%>&nbsp;</td>
            <td colspan="2" >
                <%=Model.Budget.AdvenceReturnTime%>&nbsp;</td>
            <td colspan="2" >
                <%=Model.Budget_AdvencePIC.UserName%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.AdvenceAmount.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                状态&nbsp;</td>
            <td >
                <%=Model.C.AS.Name%>&nbsp;</td>
            <td class="DataH" >
                垫支转入&nbsp;</td>
            <td >
                <%=Model.C.y.ToString("f2")%>&nbsp;</td>
            <td class="DataH" >
                尚未归垫&nbsp;</td>
            <td >
                <%=Model.C.z.ToString("f2")%>&nbsp;</td>
            <td class="DataH" >
                归垫后余额&nbsp;</td>
            <td >
                <%=Model.C.f.ToString("f2")%>&nbsp;</td>
            <td class="DataH" >
                备注&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.AdvencetRemark%>&nbsp;</td>
        </tr>
        <tr>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                预算金额&nbsp;</td>
            <td rowspan="2" class="DataH" >
                标准领报&nbsp;</td>
            <td rowspan="2" class="DataH" >
                项目经费&nbsp;</td>
            <td colspan="4" class="DataH" >
                家底弥补&nbsp;</td>
            <td rowspan="2" class="DataH" >
                其他收入&nbsp;</td>
            <td rowspan="2" class="DataH" >
                上年转入&nbsp;</td>
            <td rowspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black;">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" >
                所家底&nbsp;</td>
            <td class="DataH" >
                科技处家底&nbsp;</td>
            <td class="DataH" >
                政治部家底&nbsp;</td>
            <td class="DataH" >
                管理处家底&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.S.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_StandardFunds.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_ProjectFunds.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_DepartmentSubvention.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_ScienceSubvention.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_PoliticalSubvention.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_MangerSubvention.ToString("f2")%>&nbsp;</td>            
            <td >
                <%=Model.Budget.Income_Other.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_Balance.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black;">
                <%=Model.Budget.BudgetRemark%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                当年支出金额&nbsp;</td>
            <td colspan="2" class="DataH" >
                当年支出实际&nbsp;</td>
            <td colspan="2" class="DataH" >
                历年支出金额&nbsp;</td>
            <td colspan="4" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount.ToString("f2")%>&nbsp;</td>
            <td colspan="2" >
                <%=Model.Budget.ActualPay_Amount.ToString("f2")%>&nbsp;</td>
            <td colspan="2" >
                <%=Model.Budget.His_Amount.ToString("f2")%>&nbsp;</td>
            <td colspan="4" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetPay_Remark%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="10" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:2px solid black">
                <b>经费预算支出情况</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                序号&nbsp;</td>
            <td colspan="3" class="DataH" >
                预算开支项目&nbsp;</td>
            <td class="DataH" >
                单位&nbsp;</td>
            <td class="DataH" >
                单价&nbsp;</td>
            <td class="DataH" >
                数量&nbsp;</td>
            <td colspan="2" class="DataH" >
                预算开支金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <% foreach (wf_BudgetItem oItem in Model.Budget_Item)
           { %>
            <%if (oItem.ItemLevel == 3)
              { %>
            <tr>
                <td style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><%=oItem.ItemSN%>&nbsp;</td>
                <td colspan="3" ><%=oItem.ItemName%>&nbsp;</td>
                <td ><%=oItem.ItemUnit%>&nbsp;</td>
                <td ><%=oItem.ItemPrice.Value.ToString("f2")%>&nbsp;</td>
                <td ><%=oItem.ItemCount%>&nbsp;</td>
                <td colspan="2" ><%=oItem.ItemAmount.ToString("f2")%>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:2px solid black"><%=oItem.ItemRem%>&nbsp;</td>
            </tr>
            <% } %>
        <% } %>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="3" ><b>合计</b>&nbsp;</td>
            <td class="DataH" >&nbsp;</td>
            <td class="DataH" >&nbsp;</td>
            <td class="DataH" >&nbsp;</td>
            <td class="DataH" colspan="2" ><%=decItemTotalAmount.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td colspan="10" style="border-top:2px solid black;">&nbsp;</td>
        </tr>
    </table>
    
    <% } %>

    <%if (Model.Project_Category.ID == "3")
      { %>
    
    <table border="0" cellpadding="10" cellspacing="0" style="width:800px">
        <tr>
            <td>&nbsp;</td>
            <td align="right">
                <b style="font-size:x-large"><%=Model.Budget.Year%></b>&nbsp;</td>
            <td colspan="6" align="left">
                <b style="font-size:x-large">年度有偿服务项目经费预算明细表</b>&nbsp;</td>
        </tr>
        <tr>
            <td>编制单位：&nbsp;</td>
            <td colspan="6"><%=Model.Project_Department.DepartmentName%>&nbsp;</td>
            <td style=" text-align:right">金额单位：元&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:1px solid black">
                项目名称&nbsp;</td>
            <td colspan="7"  style="border-top:2px solid black; border-right:2px solid black">
                <%=Model.Project.ProjectName%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目代码&nbsp;</td>
            <td >
                <%=Model.Project.ProjectCode%>&nbsp;</td>
            <td class="DataH" >
                年度进度&nbsp;</td>
            <td >
                <%=Model.Budget.AnnualProgress%>&nbsp;</td>
            <td colspan="2" class="DataH" >
                经费来源&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Project.FundsSources%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                项目周期-起&nbsp;</td>
            <td >
                <%=Model.Project.ProjectBeginTime%>&nbsp;</td>
            <td class="DataH" >
                项目周期-止&nbsp;</td>
            <td >
                <%=Model.Project.ProjectEndTime%>&nbsp;</td>
            <td class="DataH" >
                项目负责人&nbsp;</td>
            <td >
                <%=Model.Project_PIC.UserName%>&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                是否垫支&nbsp;</td>
            <td class="DataH" >
                拟到经费总额&nbsp;</td>
            <td class="DataH" >
                预计经费到位时间&nbsp;</td>
            <td class="DataH" >
                预计归垫时间&nbsp;</td>
            <td class="DataH" >
                归垫责任人&nbsp;</td>
            <td class="DataH" >
                垫支金额&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.IsA.Name%>&nbsp;</td>
            <td >
                <%=Model.Budget.AdvencePlanAmount.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.AdvencePlanTime%>&nbsp;</td>
            <td >
                <%=Model.Budget.AdvenceReturnTime%>&nbsp;</td>
            <td >
                <%=Model.Budget_AdvencePIC.UserName%>&nbsp;</td>
            <td >
                <%=Model.Budget.AdvenceAmount.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.ActualPay_Remark%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                状态&nbsp;</td>
            <td >
                <%=Model.C.AS.Name%>&nbsp;</td>
            <td class="DataH" >
                垫支转入&nbsp;</td>
            <td >
                <%=Model.Budget.AdvenceBalance.ToString("f2")%>&nbsp;</td>
            <td class="DataH" >
                尚未归垫&nbsp;</td>
            <td >
                <%=Model.C.z.ToString("f2")%>&nbsp;</td>
            <td class="DataH" >
                归垫后余额&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.C.f.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                预算金额&nbsp;</td>
            <td class="DataH" >
                标准领报&nbsp;</td>
            <td class="DataH" >
                项目经费&nbsp;</td>
            <td class="DataH" >
                家底弥补&nbsp;</td>
            <td class="DataH" >
                其他收入&nbsp;</td>
            <td class="DataH" >
                上年转入&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.C.S.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_StandardFunds.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_ProjectFunds.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_Subvention.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_Other.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.Income_Balance.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetRemark%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                当年支出金额&nbsp;</td>
            <td class="DataH" >
                成本性&nbsp;</td>
            <td class="DataH" >
                公用费用&nbsp;</td>
            <td class="DataH" >
                分摊费用&nbsp;</td>
            <td class="DataH" >
                待预算经费&nbsp;</td>
            <td class="DataH" >
                上缴利润&nbsp;</td>
            <td colspan="2" class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.BudgetPay_Amount.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.BudgetPay_Amount_Prime.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.BudgetPay_Amount_Public.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.BudgetPay_Amount_Charge.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.BudgetPay_Amount_Budget.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;</td>
            <td colspan="2" style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.BudgetPay_Remark%>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                历年支出金额&nbsp;</td>
            <td class="DataH" >
                成本性&nbsp;</td>
            <td class="DataH" >
                公用费用&nbsp;</td>
            <td class="DataH" >
                分摊费用&nbsp;</td>
            <td class="DataH" >
                当年支出实际&nbsp;</td>
            <td class="DataH" >
                成本性&nbsp;</td>
            <td class="DataH" >
                公用费用&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                分摊费用&nbsp;</td>
        </tr>
        <tr>
            <td style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                <%=Model.Budget.His_Amount.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.His_Amount_Prime.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.His_Amount_Public.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.His_Amount_Charge.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.ActualPay_Amount.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.ActualPay_Amount_Prime.ToString("f2")%>&nbsp;</td>
            <td >
                <%=Model.Budget.ActualPay_Amount_Public.ToString("f2")%>&nbsp;</td>
            <td style="border-top:1px solid black; border-right:2px solid black">
                <%=Model.Budget.ActualPay_Amount_Charge.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" class="DataH" style="border-top:2px solid black; border-left:2px solid black; border-right:2px solid black">
                <b>当年预算支出明显</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-left:2px solid black; border-right:1px solid black">
                序号&nbsp;</td>
            <td colspan="2" class="DataH" >
                支出品名&nbsp;</td>
            <td class="DataH" >
                数量&nbsp;</td>
            <td class="DataH" >
                单价&nbsp;</td>
            <td colspan="2" class="DataH" >
                金额&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">
                备注&nbsp;</td>
        </tr>
        <% foreach (wf_BudgetItem oItem in Model.Budget_Item)
           { %>
            <%if (oItem.ItemLevel == 1)
              { %>
            <tr>
                <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><b><%=oItem.ItemSN%></b>&nbsp;</td>
                <td class="DataH" colspan="2" ><b><%=oItem.ItemName%></b>&nbsp;</td>
                <td class="DataH" ><b><%=oItem.ItemCount%></b>&nbsp;</td>
                <td class="DataH" ><b><%=oItem.ItemPrice%></b>&nbsp;</td>
                <td class="DataH" colspan="2" ><b><%=oItem.ItemAmount%></b>&nbsp;</td>
                <td class="DataH" style="border-top:1px solid black; border-right:2px solid black"><b><%=oItem.ItemRem%></b>&nbsp;</td>
            </tr>
            <% }
              else
              { %>
            <tr>
                <td style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><%=oItem.ItemSN%>&nbsp;</td>
                <td colspan="2" ><%=oItem.ItemName%>&nbsp;</td>
                <td ><%=oItem.ItemCount%>&nbsp;</td>
                <td ><%=oItem.ItemPrice%>&nbsp;</td>
                <td colspan="2" ><%=oItem.ItemAmount%>&nbsp;</td>
                <td style="border-top:1px solid black; border-right:2px solid black"><%=oItem.ItemRem%>&nbsp;</td>
            </tr>            
            <% } %>
        <% } %>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" ><b>支出合计</b>&nbsp;</td>
            <td class="DataH" >&nbsp;</td>
            <td class="DataH" >&nbsp;</td>
            <td class="DataH" colspan="2" ><%=decItemTotalAmount.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;">&nbsp;</td>
            <td class="DataH" colspan="2" ><b>待预算经费</b>&nbsp;</td>
            <td class="DataH" >&nbsp;</td>
            <td class="DataH" >&nbsp;</td>
            <td class="DataH" colspan="2" ><%=Model.Budget.BudgetFunds.ToString("f2")%>&nbsp;</td>
            <td class="DataH" style="border-top:1px solid black; border-right:2px solid black">&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" colspan="8" style="border-top:1px solid black; border-right:2px solid black; border-left:2px solid black;"><b>经费预算上缴利润情况</b>&nbsp;</td>
        </tr>
        <tr>
            <td class="DataH" colspan="3" style="border-top:1px solid black; border-right:1px solid black; border-left:2px solid black;"><b>上缴利润</b>&nbsp;</td>
            <td class="DataH" colspan="5" style="border-top:1px solid black; border-right:2px solid black"><%=Model.Budget.BudgetPay_Amount_Profit.ToString("f2")%>&nbsp;</td>
        </tr>
        <tr>
            <td colspan="8" style="border-top:2px solid black;">&nbsp;</td>
        </tr>
    </table>
    
    <% } %>

    <script type="text/javascript">

        function ExportExcel() {

            var x = window.open("../Download/QueryBudget/1");
            x.focus();
        }
        
    </script>
    <table>
        <tr>
            <td><%--<input type="button" value="导出" />--%></td>
            <% if (Model.U.AppCan(L_ActionType.Approve
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="审核"/>
            </td>
            <%} %>

            <% if (Model.U.AppCan(L_ActionType.Paid
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="进行支付"/>
            </td>
            <%} %>

            <% if (Model.U.AppCan(L_ActionType.Modify
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="登记收入"/>
            </td>
            <%} %>

            <% if (Model.U.AppCan(L_ActionType.Adjust
                               , new list_ProjectCategory() { ID = Model.Project.ProjectCategoryID }
                               , new md_Department() { Guid = Model.Project.DepartmentGuid }
                               , new md_User() { Guid = Model.Project.ProjectPIC }
                               , new list_BudgetStatus() { Status = Model.Budget.BudgetStatus }))
               { %>
            <td>
                <input type="button" value="调整"/>
            </td>
            <%} %>
        </tr>
    </table>
</center>
</body>

</html>
